package com.xbongbong.paas.pojo.workflow.nodes.vo;

import com.xbongbong.paas.pojo.workflow.NodeCoreConfigurationPojo;
import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.pro.enums.workflow.TriggerEventTypeEnum;
import com.xbongbong.workflow.pojo.nodes.WorkflowGetNodeListPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * @author 吴峰
 * @date 2021/05/12 11:11
 */
@Getter
@Setter
@ToString
public class WorkflowNodeGetVO extends BaseVO {


    private static final long serialVersionUID = -5986998102979216886L;

    /**
     * 工作流类型
     * @see com.xbongbong.workflow.enums.WorkflowTriggerTypeEnum
     */
    private Integer workflowType;

    /**
     * 工作流触发类型
     * @see TriggerEventTypeEnum
     */
    private Integer triggerType;

    /**
     * 节点类型
     * @see com.xbongbong.workflow.enums.WorkflowNodeTypeEnum
     */
    private Integer type;

    private String name;

    private Long workflowId;
    /**
     * 触发表单应用id
     */
    private Long appId;

    /**
     * 触发表单id
     */
    private Long formId;

    /**
     * 触发表单menu_id
     */
    private Long menuId;

    private Integer saasMark;

    private Integer businessType;

    private String nodeId;

    private Long workflowNodeId;

    private String prevId;

    private String wrapperId;

    private NodeCoreConfigurationPojo coreConfiguration;

    private Integer usePermission;

    private List<WorkflowGetNodeListPojo> nodeList;

    private String formName;

    public WorkflowNodeGetVO() {
    }

    public WorkflowNodeGetVO(String formName, Long appId, Long formId, Long menuId, Integer saasMark, Integer businessType, String nodeId, Long workflowNodeId,
                             String prevId, String wrapperId, NodeCoreConfigurationPojo workflowNodeCoreConfiguration) {
        this.formName =formName;
        this.appId = appId;
        this.formId = formId;
        this.menuId = menuId;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.nodeId = nodeId;
        this.workflowNodeId = workflowNodeId;
        this.prevId = prevId;
        this.wrapperId = wrapperId;
        this.coreConfiguration = workflowNodeCoreConfiguration;
    }

    public WorkflowNodeGetVO(Long appId, Long formId, Long menuId, Integer saasMark, Integer businessType, String nodeId, Long workflowNodeId,
                             String prevId, String wrapperId, NodeCoreConfigurationPojo workflowNodeCoreConfiguration) {
        this.appId = appId;
        this.formId = formId;
        this.menuId = menuId;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.nodeId = nodeId;
        this.workflowNodeId = workflowNodeId;
        this.prevId = prevId;
        this.wrapperId = wrapperId;
        this.coreConfiguration = workflowNodeCoreConfiguration;
    }
}
